﻿<extend name="Public/base" />
<block name="style">
<style>
.newimg_content ul {
    text-align: center;
    font-size: 13px;
    padding: 20px 0 0 0;
}
.newimg_content ul li{
  list-style: none;
    height: 30px;
    line-height: 30px;
    margin: 0 0 2px 0;
}
.newimg_content ul li a{
    display: block;
    text-decoration: none;
    color: #666;
}
.newimg_content ul li a:hover ,.newimg_content ul li .acitve{
    color: #eee;
    background: #333;
}

</style>
</block>
<block name="body">
 <div class="center_wrap row" style=" min-height:500px;">

    <div class="col-sm-2 left" style="border-right: 1px solid #fff;">
      <div class="newimg_content">
        <ul id="menu">
          <li><a href="###" id="set_up" >个人设置</a></li>
          <li><a href="###" id="head_portrait">修改密码</a></li>
          <li><a href="###" id="my_friend">我的好友</a></li>
          <li><a href="###" id="upload_picture">上传图片</a></li>
          <li><a href="###" id="picture_wall">图片墙设置</a></li>
          <li><a href="###" id="zutu">组图设置</a></li>
          <li><a href="###" id="message">留言板</a></li>
          <li><a href="###" id="friend_apply">好友申请</a></li>
        </ul>
      </div>
    </div>
    <div class="col-sm-10 right" id="right_list">
         <p class="user_title" style="height: 40px;line-height: 40px;border-bottom: 1px solid #fff;">
          <span style="font-size: 20px; padding-left: 12px;">基本信息</span>
        </p>
       <p class="bg-primary">{$Think.session.users.user_name}</p>
       <div id="menu2">
      <a href="###"><p class="bg-success">好友申请记录（<span style="color:red; font-size:18px">{$list.count_friend_apply}</span>）</p></a>
      <a href="###" id="my_friend"><p class="bg-info">好友数量（<span style="color:red;font-size:18px">{$list.count_friend}</span>）</p></a>
      <a href="###" id="message"><p class="bg-warning">留言记录（<span style="color:red;font-size:18px">{$list.count_message}</span>）</p></a>
      <a href="###" id="upload_picture"><p class="bg-danger">上传图片记录（<span style="color:red;font-size:18px">{$list.count_img}</span>）</p></a>
      </div>
    </div>
</block>

<block name="script">
  <script type="text/javascript">
   $(function(){
    $('#menu a').bind('click',right_html);
    $('#menu2 a').bind('click',right_html);
    
   })

   function right_html(){
      $(this).addClass('acitve').parents("li").siblings().find("a").removeClass("acitve");
       var data = $(this).html();
       data = data.replace(/<\/?[^>]*>/g,'');
       var title =  $(this).attr('id');
       var url = "{:U('user/right_html')}";
       $.ajax({
         url: url,
         type: 'POST',
         data: {"data": data,
                "title":title
         },
         complete: function(xhr, textStatus) {
           //called when complete
         },
         success: function(data) {
           if(data !=""){
            $('#right_list').html(data);
           }
         },
         error: function(xhr, textStatus, errorThrown) {
           //called when there is an error
         }
    });
   }
  </script>
</block>




